<!--
  Copyright 2017 Google Inc. All Rights Reserved.
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">
    <link rel="stylesheet" href="resources/examples.css">
    <link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">

    <title>CPU Benchmark Utility</title>
  </head>
  <body>
    <nav class="navbar navbar-expand-lg navbar-dark bg-dark mb-5">
      <a class="navbar-brand" href="index.html">
        <img src="resources/logo30.png" width="30" height="30" class="d-inline-block align-top">
      </a>
      <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
      </button>
      <div class="collapse navbar-collapse" id="navbarNav">
        <ul class="navbar-nav">
          <li class="nav-item">
            <a class="nav-link" href="hello-world.html">Hello World</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="vs-pannernode.html">vs. PannerNode</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="room-models.html">Room Models</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="birds.html">Flock of Birds</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="treasure-hunt.html">Treasure Hunt</a>
          </li>
          <li class="nav-item active">
            <a class="nav-link" href="benchmark.html">CPU Benchmark Utility</a>
          </li>
        </ul>
      </div>
    </nav>

    <div class="container mt-5">
      <div class="row justify-content-center">
        <div class="col-lg-5 mb-4">
          <h1>CPU Benchmark Utility</h1>
          <p>
            Run an <code>OfflineAudioContext</code> to compute one second of audio
            at 48kHz (48000 samples). Returns the total elapsed time.
          </p>

          <div class="form-row">
            <div class="form-group col-md-3">
              <label for="numberSourcesNumber" class="col-form-label">Sources</label>
              <input type="number" class="form-control" id="numberSourcesNumber" value="1" min="1" max="255">
            </div>
            <div class="form-group col-md-3">
              <label for="reverbLengthSelect" class="col-form-label">Reverb</label>
              <select id="reverbLengthSelect" class="form-control">
                <option value="none" selected>Off</option>
                <option value="short">Short</option>
                <option value="medium">Medium</option>
                <option value="long">Long</option>
              </select>
              </div>
            <div class="form-group col-md-6">
              <label for="renderingModeSelect" class="col-form-label">Rendering Mode</label>
              <select id="renderingModeSelect" class="form-control">
                <option value="foa" selected>1st-order Ambisonics</option>
                <option value="toa">3rd-order Ambisonics</option>
                <option value="panner-node">PannerNode (no reverb)</option>
              </select>
            </div>
          </div>

          <div class="input-group mb-3">
            <span class="input-group-addon">
              <img src="resources/dashboard.svg" class="icon-button">
            </span>
            <span class="input-group-btn">
              <button type="button" class="btn btn-primary" id="playback">Begin</button>
            </span>
          </div>

          <div class="progress" id="progressBar" hidden>
            <div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%"></div>
          </div>

          <div id="statusBar" class="alert alert-primary" role="alert" hidden>
          </div>

        </div>

        <div class="col-lg-5 text-center">
        </div>
      </div>

    </div>

    <script src="../build/resonance-audio.min.js"></script>
    <script src="resources/js/benchmark.js"></script>
    <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js" integrity="sha384-vFJXuSJphROIrBnz7yo7oB41mKfc8JzQZiCq4NCceLEaO4IHwicKwpJf9c9IpFgh" crossorigin="anonymous"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js" integrity="sha384-alpBpkh1PFOepccYVYDB4do5UnbKysX5WZXm3XxPqe5iKTfUKjNkCk9SaVuEZflJ" crossorigin="anonymous"></script>
  </body>
</html>
